#include<stdio.h>
int main()
{
    int arr[20] = {2,7,4,8,1,7,2};
    int temp,i;
    int n = 7;
    int fl = 1;
    while(fl)
    {
        for(i=0;i<=n;i++)
        {
            fl = 0;

            if(arr[i] > arr[i+1])
            {
                temp = arr[i];
                arr[i] = arr[i+1];
                arr[i+1] = temp;
                fl = 1;
            }
        }
    }
    return 0;
}
